home *** CD-ROM | disk | FTP | other *** search
- // UTableBase = 0x11C, /*[GLOBAL VAR] Base address of unit table unit I/O table [pointer]*/
- // UnitNtryCnt = 0x1D2, /*[GLOBAL VAR] count of entries in unit table [word]*/
-
-
- Ptr FindMI(void);
-
-
- void main(void)
- {
- Handle h,u;
- int x,y;
- DCtlPtr d;
- Ptr miptr;
-
- miptr=FindMI();
- ;;
- if (miptr)
- {
- u=(Handle)UTableBase;
-
- for (x=1;x<UnitNtryCnt;x++)
- {
- if (u[x])
- {
- h=(Handle)(u[x]);
- if (h)
- {
- d=(DCtlPtr)((Handle)(h[0]));
- if (d->dCtlRefNum == 0xFFFB)
- {
- y++;
- u[x]=miptr;
- y++;
- }
- }
- }
- }
- }
- }
-
-
- Ptr FindMI(void)
- {
- Handle h,u;
- int x;
- DCtlPtr d;
- Ptr miptr=0;
-
- u=(Handle)UTableBase;
-
- for (x=1;x<UnitNtryCnt;x++)
- {
- if (u[x])
- {
- h=(Handle)(u[x]);
- if (h)
- {
- d=(DCtlPtr)((Handle)(h[0]));
- if (d->dCtlRefNum == 0xFFE0)
- {
- miptr=u[x];
- }
- }
- }
- }
- return miptr;
- }
-